package com.newtouch.serviceconsumerhystrix;


import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ServiceHelloFallbackFactory implements FallbackFactory<ServiceHelloInterface> {

    @Override
    public ServiceHelloInterface create(Throwable throwable) {
        return () -> "access fail, reason is " + throwable.toString();
    }
}
